import service from '@/utils/request'

export const paramsApiList = (name: string) => {
	if(name=='page'){
		return '/sys/param/list';
	}else if(name=='delete'){
		return '/sys/param/del';
	}
	return "";
}

export const useParamsApi = (id: number) => {
	return service.get('/sys/param/get?ids=' + id)
}

export const useParamsSubmitApi = (dataForm: any) => {
	if (dataForm.id) {
		return service.post('/sys/param/edit', dataForm)
	} else {
		return service.post('/sys/param/add', dataForm)
	}
}
